﻿{% load staticfiles %}
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi,width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no" />

    <title>大米微信支付3</title>
	<!-- 新 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

	<!-- 可选的Bootstrap主题文件（一般不用引入） -->
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    
	<style>
	body { padding-top: 70px; }
	</style>
	
<script>
	function ti_xian()
	{
		$.ajax({ url: "/withdrawals/", type:"POST", context: document.body, dataType:"json",success: function(ret){
			if(ret.ret == 0)
			{
				window.location.reload()
			}else
			{
				alert(ret.msg + "("+ret.ret+")")
			}
		}});
	}
</script>
<body >
<div id="header" class="container text-center">
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="navbar-inner navbar-content-center">
        <p class="text-muted credit" style="padding: 10px;">
           {{ username }} 
        </p>
    </div>
	
	
</nav>
<div class="row-fluid">
<nav class="navbar navbar-default" style="padding: 10px;">
            <div class="span4">
			  <p class="text-center text-muted">可提现金额:</p>
              <h2 class="text-danger">{{ money_can_withdrawals }}</h2>
			  
			  <hr>
              <p class="text-left text-muted">
			  上次提现金额:{{ last_money_withdrawals }}元<br>
			  上次提现时间:{{ last_withdrawals_dt }}<br>
			  总提现:{{ withdrawals_sum }}元<br>
			  </p>
{% if last_done %}
					<button class="btn btn-success" onclick="ti_xian()">提现</button>
{% else %}
					<button class="btn btn-inverse">上次提现审核中</button>
{% endif %}
            </div><!--/span-->
</nav>


<div id="footer" class="container text-center">
<nav class="navbar navbar-default navbar-fixed-bottom">
    <div class="navbar-inner navbar-content-center">
        <p class="text-muted credit" style="padding: 10px;">
            <a href="http://www.dami678.com:9999/xadmin/">进入后台</a>
        </p>
    </div>
</nav>

<script>
	function isWeixin(){
		var ua = navigator.userAgent.toLowerCase();
		if(ua.match(/MicroMessenger/i)=="micromessenger") {
			return true;
		} else {
			return false;
		}
	}

	/*var viewport = document.querySelector("meta[name=viewport]");
	var winWidths=$(window).width();
	var densityDpi=640/winWidths;
		densityDpi= densityDpi>1?300*640*densityDpi/640:densityDpi;
	if(isWeixin()){
		viewport.setAttribute('content', 'width=640, user-scalable=no, target-densityDpi='+densityDpi);
		window.setTimeout(function(){
			viewport.setAttribute('content', 'width=640, user-scalable=no, target-densityDpi='+densityDpi);
		},1000);

	}else{
		viewport.setAttribute('content', 'width=640, user-scalable=no');

		window.setTimeout(function(){
			viewport.setAttribute('content', 'width=640, user-scalable=yes');
		},1000);
	}*/

	</script>
</body>

</html>
